// 模块引入
pub fn message() -> String {
    let res = String::from("这是第二个模块");
    return res;
}

// 结构体本身是私有的，其字段默认也是私有的

mod back_of_house {
    pub struct Breakfast {
        pub toast: String,
        pub seasonal_fruit: String,
    }
    impl Breakfast {
        pub fn summer(toast: &str) -> Breakfast {
            Breakfast {
                toast: String::from(toast),
                seasonal_fruit: String::from("peaches"),
            }
        }
    }
}

pub fn eat_at() {
    let mut meal = back_of_house::Breakfast::summer("咪咪");
    meal.toast = String::from("旺旺");
    meal.seasonal_fruit = String::from("不好吃");
    println!(
        "I don't like {} toast,因为{}",
        meal.toast, meal.seasonal_fruit
    );
}

pub fn out_err_msg() {
  panic!("输出错误信息")
}